# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=MailTools
pkgname=perl-${_realname}
pkgver=2.20
pkgrel=1
pkgdesc="Various e-mail related modules"
arch=('any')
url="https://metacpan.org/release/MailTools"
license=('PerlArtistic' 'GPL')
depends=('perl-TimeDate')
options=('!emptydirs')
source=("https://www.cpan.org/authors/id/M/MA/MARKOV/MailTools-$pkgver.tar.gz")
sha256sums=('f55606f7a9cc342ee9d5f996e2b6a4c0047e2ee47cd88c3250ecf0d0c5fb3196')

build() {
  cd MailTools-$pkgver
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd ${_realname}-$pkgver
  make test
}

package() {
  cd ${_realname}-$pkgver
  make DESTDIR="$pkgdir" install
}
